cmake_minimum_required(VERSION 3.5)

project(PclViewer)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON) 

set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(Qt5 COMPONENTS Concurrent OpenGL Widgets REQUIRED)
find_package(PCL 1.14.0 REQUIRED)
find_package(VTK REQUIRED)


if(MSVC)
    add_compile_options("/source-charset:utf-8")
endif()

include_directories(${PCL_INCLUDE_DIRS})
add_definitions(${PCL_DEFINITIONS})


set(Srcs
  main.cpp
  PclViewer.cpp)

set(Hdrs
  PclViewer.h)

set(UIs
  PclViewer.ui)


add_executable(${PROJECT_NAME}  ${Srcs} ${Hdrs} ${UIs} ${QRCs}
     widget/EzQVTKInteractor.cxx widget/EzQVTKInteractor.h widget/EzQVTKInteractorAdapter.cxx widget/EzQVTKInteractorAdapter.h widget/EzQVTKOpenGLNativeWidget.cxx widget/EzQVTKOpenGLNativeWidget.h widget/EzQVTKRenderWindowAdapter.cxx widget/EzQVTKRenderWindowAdapter.h
     widget/EzQVTKInteractorInternal.h

     )

target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES} Qt5::Widgets)
